home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Notification.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  3.2 KB  |  124 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Notification.h
  3.  
  4.      Contains:    Notification Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1989-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __NOTIFICATION__
  18. #define __NOTIFICATION__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __OSUTILS__
  25.     #include <OSUtils.h>
  26. #endif
  27.  
  28.  
  29.  
  30.  
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50.  
  51. typedef struct NMRec                     NMRec;
  52. typedef NMRec *                            NMRecPtr;
  53. typedef CALLBACK_API( void , NMProcPtr )(NMRecPtr nmReqPtr);
  54. typedef STACK_UPP_TYPE(NMProcPtr)                                 NMUPP;
  55.  
  56. struct NMRec {
  57.     QElemPtr                         qLink;                        /* next queue entry*/
  58.     short                             qType;                        /* queue type -- ORD(nmType) = 8*/
  59.     short                             nmFlags;                    /* reserved*/
  60.     long                             nmPrivate;                    /* reserved*/
  61.     short                             nmReserved;                    /* reserved*/
  62.     short                             nmMark;                        /* item to mark in Apple menu*/
  63.     Handle                             nmIcon;                        /* handle to small icon*/
  64.     Handle                             nmSound;                    /* handle to sound record*/
  65.     StringPtr                         nmStr;                        /* string to appear in alert*/
  66.     NMUPP                             nmResp;                        /* pointer to response routine*/
  67.     long                             nmRefCon;                    /* for application use*/
  68. };
  69.  
  70. #if OPAQUE_UPP_TYPES
  71.     EXTERN_API(NMUPP)
  72.     NewNMUPP                       (NMProcPtr                userRoutine);
  73.  
  74.     EXTERN_API(void)
  75.     DisposeNMUPP                   (NMUPP                    userUPP);
  76.  
  77.     EXTERN_API(void)
  78.     InvokeNMUPP                       (NMRecPtr                nmReqPtr,
  79.                                     NMUPP                    userUPP);
  80.  
  81. #else
  82.     enum { uppNMProcInfo = 0x000000C0 };                             /* pascal no_return_value Func(4_bytes) */
  83.     #define NewNMUPP(userRoutine)                                     (NMUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppNMProcInfo, GetCurrentArchitecture())
  84.     #define DisposeNMUPP(userUPP)                                     DisposeRoutineDescriptor(userUPP)
  85.     #define InvokeNMUPP(nmReqPtr, userUPP)                             CALL_ONE_PARAMETER_UPP((userUPP), uppNMProcInfo, (nmReqPtr))
  86. #endif
  87. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  88. #define NewNMProc(userRoutine)                                     NewNMUPP(userRoutine)
  89. #define CallNMProc(userRoutine, nmReqPtr)                        InvokeNMUPP(nmReqPtr, userRoutine)
  90.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  91.                                                                                             #pragma parameter __D0 NMInstall(__A0)
  92.                                                                                             #endif
  93. EXTERN_API( OSErr )
  94. NMInstall                        (NMRecPtr                 nmReqPtr)                            ONEWORDINLINE(0xA05E);
  95.  
  96.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  97.                                                                                             #pragma parameter __D0 NMRemove(__A0)
  98.                                                                                             #endif
  99. EXTERN_API( OSErr )
  100. NMRemove                        (NMRecPtr                 nmReqPtr)                            ONEWORDINLINE(0xA05F);
  101.  
  102.  
  103.  
  104. #if PRAGMA_STRUCT_ALIGN
  105.     #pragma options align=reset
  106. #elif PRAGMA_STRUCT_PACKPUSH
  107.     #pragma pack(pop)
  108. #elif PRAGMA_STRUCT_PACK
  109.     #pragma pack()
  110. #endif
  111.  
  112. #ifdef PRAGMA_IMPORT_OFF
  113. #pragma import off
  114. #elif PRAGMA_IMPORT
  115. #pragma import reset
  116. #endif
  117.  
  118. #ifdef __cplusplus
  119. }
  120. #endif
  121.  
  122. #endif /* __NOTIFICATION__ */
  123.  
  124.